package com.study.system.service.impl;

import com.study.model.book.Book;
import com.study.model.system.SysPost;
import com.study.model.vo.SysPostQueryVo;
import com.study.system.mapper.SysPostMapper;
import com.study.system.service.SysPostService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>study
 * 岗位信息表 服务实现类
 * </p>
 *
 * @author yubao
 * @since 2022-10-31
 */
@Service
public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> implements SysPostService {

    @Override
    public IPage<SysPost> selectPage(Page<SysPost> pageParam, SysPostQueryVo sysPostQueryVo) {
        return baseMapper.selectPage(pageParam,sysPostQueryVo);
    }

    @Override
    public void updateStatus(String id, Integer status) {
        SysPost sysPost =  baseMapper.selectById(id);
        sysPost.setStatus(status);
        baseMapper.updateById(sysPost);
    }
}
